<?
		include 'acme.php';
		$dir = file_get_contents('http://acme-web.googlecode.com/svn/plugins/');
		preg_match_all('/a href..(.*)\.php\"/', $dir, $fn);
 ?>
 
 <style>
	body {font: italic normal 11px/150% Arial, Helvetica, sans-serif}
	input {font: italic normal 11px/150% Arial, Helvetica, sans-serif}
	div {margin:20px 20px 20px 20px}
	#menu {width:500px; float:left}
	#info {float:left;width:550px}
	#ta {width:600px; height:400px}
	#code {}
 </style>
 
 <div id='menu'>
	<? 
			foreach($fn[1] as $f)
					if($f != '' && $f != 'dev/' && !preg_match('/http/', $f) && !preg_match('/\.\./', $f)) {
							echo "<form><h2>$f</h2><br><input type='hidden' name='plugin' value='$f'/>";
							$pcode = file_get_contents("http://acme-web.googlecode.com/svn/plugins/$f.php");
							preg_match('/\/\*(.*)\*/', $pcode, $m);
							foreach(explode(",", $m[1]) as $param)
									echo "<input name='$param' value='$param'></input>";
							echo "<input type='submit'/></form><hr>";
					}
	?>
 </div>
 
 <div id='info'>
		<?
				if($_GET['plugin']) {
					@mkdir('plugin-test');  $pn = $_GET['plugin']; $data=array();
					$lfn = "plugin-test/{$pn}.php";  @unlink($lfn);
					file_put_contents($lfn, file_get_contents("http://acme-web.googlecode.com/svn/plugins/$pn.php"));
					foreach($_GET as $k=>$v) {
							if($k == 'plugin') continue;
							$data[$k] = $v;
					}
					echo "<h3>$pn</h3>";
					print_r($data);
					echo "<br><br><div id='code'>";
					include "plugin-test/$pn.php";	
					echo "</div>";
					echo "<textarea id='ta'>";include "plugin-test/$pn.php";	echo"</textarea>";
				}
		?>
 </div>
 